//
//  destinstionDetailModel.m
//  Journey
//
//  Created by dllo on 16/5/21.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import "destinstionDetailModel.h"
#import "discountModel.h"
#import "detailsModel.h"
@implementation destinstionDetailModel

-(void)setValue:(id)value forUndefinedKey:(NSString *)key{
    if ([key isEqualToString:@"new_discount"]) {
        self.discount = value;
        
    }

}

-(void)setDiscount:(NSMutableArray *)discount{
    NSMutableArray *disArray = [NSMutableArray array];
    for (NSDictionary *disDic in discount) {
        discountModel *discount = [[discountModel alloc] init];
        [discount setValuesForKeysWithDictionary:disDic];
        [disArray addObject:discount];
        
    }
    _discount = [NSMutableArray arrayWithArray:disArray];
   
}

-(void)setHot_city:(NSMutableArray *)hot_city{
    NSMutableArray *hotArray = [NSMutableArray array];
    for (NSDictionary *hotDic in hot_city) {
        detailsModel *detail = [[detailsModel alloc] init];
        [detail setValuesForKeysWithDictionary:hotDic];
        [hotArray addObject:detail];
    }
    _hot_city = [NSMutableArray arrayWithArray:hotArray];
}

@end
